#include"Stock.h"

int main()
{
	Stock s1("add", 20, 12.5);

	s1.show();
	s1.buy(15, 18.125);
	s1.show();
	s1.sell(400, 20.00);
	s1.show();
	s1.buy(300000, 40.125);
	s1.show();
	s1.sell(300000, 0.125);
	s1.show();
	
	cout << s1.gettot() << endl;
	
	Stock s2;
	s2.show();
	
	cout << endl;
	const int num = 3;
	Stock arr[num]{{"aaa", 12, 20}, {"bbb", 200, 2}, {"ccc", 130, 3.25}};
	cout << "highest:" << endl;
	const Stock& high = arr[0].topval(arr[1].topval(arr[2]));
	cout << high.gettot() << endl;
	return 0;
}
